#include <iostream>
#include <vector>
using namespace std;
int main() {
    int n;
    cin >> n;
    int add = 0;
    int mul = 1;
    vector<int> v;
    for (size_t i = 0; i < n; ++i) {
        int tem = 0;
        cin >> tem;
        v.push_back(tem);
        add += tem; mul *= tem;
    }

    int count = 0;
    if (add > mul) {
        while (v.size()>1) {
            int max = v[0];
            int maxi = 0;
            size_t i;
            for (i = 0; i < v.size(); ++i) {
                if (max < v[i]) {
                    max = v[i];
                    maxi = i;
                }
            }
            mul /= max;
            count++;
            v.erase(v.begin() + maxi);
        }
        cout << count << endl;

    }
    else {
        cout << 0 << endl;
    }
    return 0;
}
